getting factorial of a number